home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Python 1.3 / Python 1.3 PPC / Tools / bgen / ae / AppleScript_Suite.py < prev    next >
Encoding:
Python Source  |  1995-10-11  |  32.7 KB  |  1,057 lines  |  [TEXT/PYTH]

  1. """Suite AppleScript Suite: Goodies for Gustav
  2. Level 1, version 1
  3.  
  4. Generated from Moes:System folder:Extensions:Scripting Additions:Dialects:English Dialect
  5. AETE/AEUT resource version 1/0, language 0, script 0
  6. """
  7.  
  8. import addpack
  9. addpack.addpack('Tools')
  10. addpack.addpack('bgen')
  11. addpack.addpack('ae')
  12.  
  13. import aetools
  14. import MacOS
  15.  
  16. _code = 'ascr'
  17.  
  18. _Enum_cons = {
  19.     'case' : 'case',    # case
  20.     'diacriticals' : 'diac',    # diacriticals
  21.     'white_space' : 'whit',    # white space
  22.     'hyphens' : 'hyph',    # hyphens
  23.     'expansion' : 'expa',    # expansion
  24.     'punctuation' : 'punc',    # punctuation
  25.     'application_responses' : 'rmte',    # remote event replies
  26. }
  27.  
  28. _Enum_boov = {
  29.     'true' : 'true',    # the true boolean value
  30.     'false' : 'fals',    # the false boolean value
  31. }
  32.  
  33. _Enum_misc = {
  34.     'current_application' : 'cura',    # the current application
  35. }
  36.  
  37. class AppleScript_Suite:
  38.  
  39.     def activate(self, _no_object=None, _attributes={}, **_arguments):
  40.         """activate: Bring targeted application program to the front.
  41.         Keyword argument _attributes: AppleEvent attribute dictionary
  42.         """
  43.         _code = 'misc'
  44.         _subcode = 'actv'
  45.  
  46.         if _arguments: raise TypeError, 'No optional args expected'
  47.         if _no_object != None: raise TypeError, 'No direct arg expected'
  48.  
  49.  
  50.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  51.                 _arguments, _attributes)
  52.         if _arguments.has_key('errn'):
  53.             raise MacOS.Error, aetools.decodeerror(_arguments)
  54.         # XXXX Optionally decode result
  55.         if _arguments.has_key('----'):
  56.             return _arguments['----']
  57.  
  58.     def log(self, _object, _attributes={}, **_arguments):
  59.         """log: Cause a comment to be logged.
  60.         Required argument: anything
  61.         Keyword argument _attributes: AppleEvent attribute dictionary
  62.         """
  63.         _code = 'ascr'
  64.         _subcode = 'cmnt'
  65.  
  66.         if _arguments: raise TypeError, 'No optional args expected'
  67.         _arguments['----'] = _object
  68.  
  69.  
  70.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  71.                 _arguments, _attributes)
  72.         if _arguments.has_key('errn'):
  73.             raise MacOS.Error, aetools.decodeerror(_arguments)
  74.         # XXXX Optionally decode result
  75.         if _arguments.has_key('----'):
  76.             return _arguments['----']
  77.  
  78.     def stop_log(self, _no_object=None, _attributes={}, **_arguments):
  79.         """stop log: 
  80.         Keyword argument _attributes: AppleEvent attribute dictionary
  81.         """
  82.         _code = 'ToyS'
  83.         _subcode = 'log0'
  84.  
  85.         if _arguments: raise TypeError, 'No optional args expected'
  86.         if _no_object != None: raise TypeError, 'No direct arg expected'
  87.  
  88.  
  89.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  90.                 _arguments, _attributes)
  91.         if _arguments.has_key('errn'):
  92.             raise MacOS.Error, aetools.decodeerror(_arguments)
  93.         # XXXX Optionally decode result
  94.         if _arguments.has_key('----'):
  95.             return _arguments['----']
  96.  
  97.     def start_log(self, _no_object=None, _attributes={}, **_arguments):
  98.         """start log: 
  99.         Keyword argument _attributes: AppleEvent attribute dictionary
  100.         """
  101.         _code = 'ToyS'
  102.         _subcode = 'log1'
  103.  
  104.         if _arguments: raise TypeError, 'No optional args expected'
  105.         if _no_object != None: raise TypeError, 'No direct arg expected'
  106.  
  107.  
  108.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  109.                 _arguments, _attributes)
  110.         if _arguments.has_key('errn'):
  111.             raise MacOS.Error, aetools.decodeerror(_arguments)
  112.         # XXXX Optionally decode result
  113.         if _arguments.has_key('----'):
  114.             return _arguments['----']
  115.  
  116.     def copy(self, _no_object=None, _attributes={}, **_arguments):
  117.         """copy: Copy an object to the clipboard
  118.         Keyword argument _attributes: AppleEvent attribute dictionary
  119.         """
  120.         _code = 'misc'
  121.         _subcode = 'copy'
  122.  
  123.         if _arguments: raise TypeError, 'No optional args expected'
  124.         if _no_object != None: raise TypeError, 'No direct arg expected'
  125.  
  126.  
  127.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  128.                 _arguments, _attributes)
  129.         if _arguments.has_key('errn'):
  130.             raise MacOS.Error, aetools.decodeerror(_arguments)
  131.         # XXXX Optionally decode result
  132.         if _arguments.has_key('----'):
  133.             return _arguments['----']
  134.  
  135.     def do_script(self, _object, _attributes={}, **_arguments):
  136.         """do script: Execute a script
  137.         Required argument: the script to execute
  138.         Keyword argument _attributes: AppleEvent attribute dictionary
  139.         Returns: anything
  140.         """
  141.         _code = 'misc'
  142.         _subcode = 'dosc'
  143.  
  144.         if _arguments: raise TypeError, 'No optional args expected'
  145.         _arguments['----'] = _object
  146.  
  147.  
  148.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  149.                 _arguments, _attributes)
  150.         if _arguments.has_key('errn'):
  151.             raise MacOS.Error, aetools.decodeerror(_arguments)
  152.         # XXXX Optionally decode result
  153.         if _arguments.has_key('----'):
  154.             return _arguments['----']
  155.  
  156.     def idle(self, _no_object=None, _attributes={}, **_arguments):
  157.         """idle: Sent to a script application when it is idle
  158.         Keyword argument _attributes: AppleEvent attribute dictionary
  159.         Returns: Number of seconds to wait for next idle event
  160.         """
  161.         _code = 'misc'
  162.         _subcode = 'idle'
  163.  
  164.         if _arguments: raise TypeError, 'No optional args expected'
  165.         if _no_object != None: raise TypeError, 'No direct arg expected'
  166.  
  167.  
  168.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  169.                 _arguments, _attributes)
  170.         if _arguments.has_key('errn'):
  171.             raise MacOS.Error, aetools.decodeerror(_arguments)
  172.         # XXXX Optionally decode result
  173.         if _arguments.has_key('----'):
  174.             return _arguments['----']
  175.  
  176.     def launch(self, _no_object=None, _attributes={}, **_arguments):
  177.         """launch: Start an application for scripting
  178.         Keyword argument _attributes: AppleEvent attribute dictionary
  179.         Returns: anything
  180.         """
  181.         _code = 'ascr'
  182.         _subcode = 'noop'
  183.  
  184.         if _arguments: raise TypeError, 'No optional args expected'
  185.         if _no_object != None: raise TypeError, 'No direct arg expected'
  186.  
  187.  
  188.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  189.                 _arguments, _attributes)
  190.         if _arguments.has_key('errn'):
  191.             raise MacOS.Error, aetools.decodeerror(_arguments)
  192.         # XXXX Optionally decode result
  193.         if _arguments.has_key('----'):
  194.             return _arguments['----']
  195.  
  196.     def tell(self, _no_object=None, _attributes={}, **_arguments):
  197.         """tell: Magic tell event for event logging
  198.         Keyword argument _attributes: AppleEvent attribute dictionary
  199.         Returns: anything
  200.         """
  201.         _code = 'ascr'
  202.         _subcode = 'tell'
  203.  
  204.         if _arguments: raise TypeError, 'No optional args expected'
  205.         if _no_object != None: raise TypeError, 'No direct arg expected'
  206.  
  207.  
  208.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  209.                 _arguments, _attributes)
  210.         if _arguments.has_key('errn'):
  211.             raise MacOS.Error, aetools.decodeerror(_arguments)
  212.         # XXXX Optionally decode result
  213.         if _arguments.has_key('----'):
  214.             return _arguments['----']
  215.  
  216.     def end_tell(self, _no_object=None, _attributes={}, **_arguments):
  217.         """end tell: Start an application for scripting
  218.         Keyword argument _attributes: AppleEvent attribute dictionary
  219.         Returns: anything
  220.         """
  221.         _code = 'ascr'
  222.         _subcode = 'tend'
  223.  
  224.         if _arguments: raise TypeError, 'No optional args expected'
  225.         if _no_object != None: raise TypeError, 'No direct arg expected'
  226.  
  227.  
  228.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  229.                 _arguments, _attributes)
  230.         if _arguments.has_key('errn'):
  231.             raise MacOS.Error, aetools.decodeerror(_arguments)
  232.         # XXXX Optionally decode result
  233.         if _arguments.has_key('----'):
  234.             return _arguments['----']
  235.  
  236.     _argmap_error = {
  237.         'number' : 'errn',
  238.         'partial_result' : 'ptlr',
  239.         '_from' : 'erob',
  240.         'to' : 'errt',
  241.     }
  242.  
  243.     def error(self, _object=None, _attributes={}, **_arguments):
  244.         """error: Raise an error
  245.         Required argument: anything
  246.         Keyword argument number: an error number
  247.         Keyword argument partial_result: any partial result occurring before the error
  248.         Keyword argument _from: the object that caused the error
  249.         Keyword argument to: another parameter to the error
  250.         Keyword argument _attributes: AppleEvent attribute dictionary
  251.         Returns: anything
  252.         """
  253.         _code = 'ascr'
  254.         _subcode = 'err '
  255.  
  256.         aetools.keysubst(_arguments, self._argmap_error)
  257.         _arguments['----'] = _object
  258.  
  259.  
  260.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  261.                 _arguments, _attributes)
  262.         if _arguments.has_key('errn'):
  263.             raise MacOS.Error, aetools.decodeerror(_arguments)
  264.         # XXXX Optionally decode result
  265.         if _arguments.has_key('----'):
  266.             return _arguments['----']
  267.  
  268.     _argmap_Call_a5_subroutine = {
  269.         'at' : 'at  ',
  270.         '_from' : 'from',
  271.         '_for' : 'for ',
  272.         'to' : 'to  ',
  273.         'thru' : 'thru',
  274.         'through' : 'thgh',
  275.         'by' : 'by  ',
  276.         'on' : 'on  ',
  277.         'into' : 'into',
  278.         'onto' : 'onto',
  279.         'between' : 'btwn',
  280.         'against' : 'agst',
  281.         'out_of' : 'outo',
  282.         'instead_of' : 'isto',
  283.         'aside_from' : 'asdf',
  284.         'around' : 'arnd',
  285.         'beside' : 'bsid',
  286.         'beneath' : 'bnth',
  287.         'under' : 'undr',
  288.         'over' : 'over',
  289.         'above' : 'abve',
  290.         'below' : 'belw',
  291.         'apart_from' : 'aprt',
  292.         'given' : 'givn',
  293.         'with' : 'with',
  294.         'without' : 'wout',
  295.         'about' : 'abou',
  296.         'since' : 'snce',
  297.         'until' : 'till',
  298.         'returning' : 'Krtn',
  299.     }
  300.  
  301.     def Call_a5_subroutine(self, _object=None, _attributes={}, **_arguments):
  302.         """Call•subroutine: A subroutine call
  303.         Required argument: anything
  304.         Keyword argument at: a preposition
  305.         Keyword argument _from: a preposition
  306.         Keyword argument _for: a preposition
  307.         Keyword argument to: a preposition
  308.         Keyword argument thru: a preposition
  309.         Keyword argument through: a preposition
  310.         Keyword argument by: a preposition
  311.         Keyword argument on: a preposition
  312.         Keyword argument into: a preposition
  313.         Keyword argument onto: a preposition
  314.         Keyword argument between: a preposition
  315.         Keyword argument against: a preposition
  316.         Keyword argument out_of: a preposition
  317.         Keyword argument instead_of: a preposition
  318.         Keyword argument aside_from: a preposition
  319.         Keyword argument around: a preposition
  320.         Keyword argument beside: a preposition
  321.         Keyword argument beneath: a preposition
  322.         Keyword argument under: a preposition
  323.         Keyword argument over: a preposition
  324.         Keyword argument above: a preposition
  325.         Keyword argument below: a preposition
  326.         Keyword argument apart_from: a preposition
  327.         Keyword argument given: a preposition
  328.         Keyword argument with: special preposition for setting event properties
  329.         Keyword argument without: special preposition for clearing event properties
  330.         Keyword argument about: a preposition
  331.         Keyword argument since: a preposition
  332.         Keyword argument until: a preposition
  333.         Keyword argument returning: specifies a pattern to match results to
  334.         Keyword argument _attributes: AppleEvent attribute dictionary
  335.         Returns: anything
  336.         """
  337.         _code = 'ascr'
  338.         _subcode = 'psbr'
  339.  
  340.         aetools.keysubst(_arguments, self._argmap_Call_a5_subroutine)
  341.         _arguments['----'] = _object
  342.  
  343.  
  344.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  345.                 _arguments, _attributes)
  346.         if _arguments.has_key('errn'):
  347.             raise MacOS.Error, aetools.decodeerror(_arguments)
  348.         # XXXX Optionally decode result
  349.         if _arguments.has_key('----'):
  350.             return _arguments['----']
  351.  
  352.     def _3d_(self, _object, _attributes={}, **_arguments):
  353.         """=: Equality
  354.         Required argument: an AE object reference
  355.         Keyword argument _attributes: AppleEvent attribute dictionary
  356.         Returns: anything
  357.         """
  358.         _code = 'ascr'
  359.         _subcode = '=   '
  360.  
  361.         if _arguments: raise TypeError, 'No optional args expected'
  362.         _arguments['----'] = _object
  363.  
  364.  
  365.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  366.                 _arguments, _attributes)
  367.         if _arguments.has_key('errn'):
  368.             raise MacOS.Error, aetools.decodeerror(_arguments)
  369.         # XXXX Optionally decode result
  370.         if _arguments.has_key('----'):
  371.             return _arguments['----']
  372.  
  373.     def _ad_(self, _object, _attributes={}, **_arguments):
  374.         """≠: Inequality
  375.         Required argument: an AE object reference
  376.         Keyword argument _attributes: AppleEvent attribute dictionary
  377.         Returns: anything
  378.         """
  379.         _code = 'ascr'
  380.         _subcode = '\255   '
  381.  
  382.         if _arguments: raise TypeError, 'No optional args expected'
  383.         _arguments['----'] = _object
  384.  
  385.  
  386.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  387.                 _arguments, _attributes)
  388.         if _arguments.has_key('errn'):
  389.             raise MacOS.Error, aetools.decodeerror(_arguments)
  390.         # XXXX Optionally decode result
  391.         if _arguments.has_key('----'):
  392.             return _arguments['----']
  393.  
  394.     def _2b_(self, _object, _attributes={}, **_arguments):
  395.         """+: Addition
  396.         Required argument: an AE object reference
  397.         Keyword argument _attributes: AppleEvent attribute dictionary
  398.         Returns: anything
  399.         """
  400.         _code = 'ascr'
  401.         _subcode = '+   '
  402.  
  403.         if _arguments: raise TypeError, 'No optional args expected'
  404.         _arguments['----'] = _object
  405.  
  406.  
  407.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  408.                 _arguments, _attributes)
  409.         if _arguments.has_key('errn'):
  410.             raise MacOS.Error, aetools.decodeerror(_arguments)
  411.         # XXXX Optionally decode result
  412.         if _arguments.has_key('----'):
  413.             return _arguments['----']
  414.  
  415.     def _2d_(self, _object, _attributes={}, **_arguments):
  416.         """-: Subtraction
  417.         Required argument: an AE object reference
  418.         Keyword argument _attributes: AppleEvent attribute dictionary
  419.         Returns: anything
  420.         """
  421.         _code = 'ascr'
  422.         _subcode = '-   '
  423.  
  424.         if _arguments: raise TypeError, 'No optional args expected'
  425.         _arguments['----'] = _object
  426.  
  427.  
  428.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  429.                 _arguments, _attributes)
  430.         if _arguments.has_key('errn'):
  431.             raise MacOS.Error, aetools.decodeerror(_arguments)
  432.         # XXXX Optionally decode result
  433.         if _arguments.has_key('----'):
  434.             return _arguments['----']
  435.  
  436.     def _2a_(self, _object, _attributes={}, **_arguments):
  437.         """*: Multiplication
  438.         Required argument: an AE object reference
  439.         Keyword argument _attributes: AppleEvent attribute dictionary
  440.         Returns: anything
  441.         """
  442.         _code = 'ascr'
  443.         _subcode = '*   '
  444.  
  445.         if _arguments: raise TypeError, 'No optional args expected'
  446.         _arguments['----'] = _object
  447.  
  448.  
  449.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  450.                 _arguments, _attributes)
  451.         if _arguments.has_key('errn'):
  452.             raise MacOS.Error, aetools.decodeerror(_arguments)
  453.         # XXXX Optionally decode result
  454.         if _arguments.has_key('----'):
  455.             return _arguments['----']
  456.  
  457.     def _d6_(self, _object, _attributes={}, **_arguments):
  458.         """÷: Division
  459.         Required argument: an AE object reference
  460.         Keyword argument _attributes: AppleEvent attribute dictionary
  461.         Returns: anything
  462.         """
  463.         _code = 'ascr'
  464.         _subcode = '/   '
  465.  
  466.         if _arguments: raise TypeError, 'No optional args expected'
  467.         _arguments['----'] = _object
  468.  
  469.  
  470.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  471.                 _arguments, _attributes)
  472.         if _arguments.has_key('errn'):
  473.             raise MacOS.Error, aetools.decodeerror(_arguments)
  474.         # XXXX Optionally decode result
  475.         if _arguments.has_key('----'):
  476.             return _arguments['----']
  477.  
  478.     def div(self, _object, _attributes={}, **_arguments):
  479.         """div: Quotient
  480.         Required argument: an AE object reference
  481.         Keyword argument _attributes: AppleEvent attribute dictionary
  482.         Returns: anything
  483.         """
  484.         _code = 'ascr'
  485.         _subcode = 'div '
  486.  
  487.         if _arguments: raise TypeError, 'No optional args expected'
  488.         _arguments['----'] = _object
  489.  
  490.  
  491.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  492.                 _arguments, _attributes)
  493.         if _arguments.has_key('errn'):
  494.             raise MacOS.Error, aetools.decodeerror(_arguments)
  495.         # XXXX Optionally decode result
  496.         if _arguments.has_key('----'):
  497.             return _arguments['----']
  498.  
  499.     def mod(self, _object, _attributes={}, **_arguments):
  500.         """mod: Remainder
  501.         Required argument: an AE object reference
  502.         Keyword argument _attributes: AppleEvent attribute dictionary
  503.         Returns: anything
  504.         """
  505.         _code = 'ascr'
  506.         _subcode = 'mod '
  507.  
  508.         if _arguments: raise TypeError, 'No optional args expected'
  509.         _arguments['----'] = _object
  510.  
  511.  
  512.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  513.                 _arguments, _attributes)
  514.         if _arguments.has_key('errn'):
  515.             raise MacOS.Error, aetools.decodeerror(_arguments)
  516.         # XXXX Optionally decode result
  517.         if _arguments.has_key('----'):
  518.             return _arguments['----']
  519.  
  520.     def _5e_(self, _object, _attributes={}, **_arguments):
  521.         """^: Exponentiation
  522.         Required argument: an AE object reference
  523.         Keyword argument _attributes: AppleEvent attribute dictionary
  524.         Returns: anything
  525.         """
  526.         _code = 'ascr'
  527.         _subcode = '^   '
  528.  
  529.         if _arguments: raise TypeError, 'No optional args expected'
  530.         _arguments['----'] = _object
  531.  
  532.  
  533.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  534.                 _arguments, _attributes)
  535.         if _arguments.has_key('errn'):
  536.             raise MacOS.Error, aetools.decodeerror(_arguments)
  537.         # XXXX Optionally decode result
  538.         if _arguments.has_key('----'):
  539.             return _arguments['----']
  540.  
  541.     def _3e_(self, _object, _attributes={}, **_arguments):
  542.         """>: Greater than
  543.         Required argument: an AE object reference
  544.         Keyword argument _attributes: AppleEvent attribute dictionary
  545.         Returns: anything
  546.         """
  547.         _code = 'ascr'
  548.         _subcode = '>   '
  549.  
  550.         if _arguments: raise TypeError, 'No optional args expected'
  551.         _arguments['----'] = _object
  552.  
  553.  
  554.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  555.                 _arguments, _attributes)
  556.         if _arguments.has_key('errn'):
  557.             raise MacOS.Error, aetools.decodeerror(_arguments)
  558.         # XXXX Optionally decode result
  559.         if _arguments.has_key('----'):
  560.             return _arguments['----']
  561.  
  562.     def _b3_(self, _object, _attributes={}, **_arguments):
  563.         """≥: Greater than or equal to
  564.         Required argument: an AE object reference
  565.         Keyword argument _attributes: AppleEvent attribute dictionary
  566.         Returns: anything
  567.         """
  568.         _code = 'ascr'
  569.         _subcode = '>=  '
  570.  
  571.         if _arguments: raise TypeError, 'No optional args expected'
  572.         _arguments['----'] = _object
  573.  
  574.  
  575.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  576.                 _arguments, _attributes)
  577.         if _arguments.has_key('errn'):
  578.             raise MacOS.Error, aetools.decodeerror(_arguments)
  579.         # XXXX Optionally decode result
  580.         if _arguments.has_key('----'):
  581.             return _arguments['----']
  582.  
  583.     def _3c_(self, _object, _attributes={}, **_arguments):
  584.         """<: Less than
  585.         Required argument: an AE object reference
  586.         Keyword argument _attributes: AppleEvent attribute dictionary
  587.         Returns: anything
  588.         """
  589.         _code = 'ascr'
  590.         _subcode = '<   '
  591.  
  592.         if _arguments: raise TypeError, 'No optional args expected'
  593.         _arguments['----'] = _object
  594.  
  595.  
  596.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  597.                 _arguments, _attributes)
  598.         if _arguments.has_key('errn'):
  599.             raise MacOS.Error, aetools.decodeerror(_arguments)
  600.         # XXXX Optionally decode result
  601.         if _arguments.has_key('----'):
  602.             return _arguments['----']
  603.  
  604.     def _b2_(self, _object, _attributes={}, **_arguments):
  605.         """≤: Less than or equal to
  606.         Required argument: an AE object reference
  607.         Keyword argument _attributes: AppleEvent attribute dictionary
  608.         Returns: anything
  609.         """
  610.         _code = 'ascr'
  611.         _subcode = '<=  '
  612.  
  613.         if _arguments: raise TypeError, 'No optional args expected'
  614.         _arguments['----'] = _object
  615.  
  616.  
  617.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  618.                 _arguments, _attributes)
  619.         if _arguments.has_key('errn'):
  620.             raise MacOS.Error, aetools.decodeerror(_arguments)
  621.         # XXXX Optionally decode result
  622.         if _arguments.has_key('----'):
  623.             return _arguments['----']
  624.  
  625.     def _26_(self, _object, _attributes={}, **_arguments):
  626.         """&: Concatenation
  627.         Required argument: an AE object reference
  628.         Keyword argument _attributes: AppleEvent attribute dictionary
  629.         Returns: anything
  630.         """
  631.         _code = 'ascr'
  632.         _subcode = 'ccat'
  633.  
  634.         if _arguments: raise TypeError, 'No optional args expected'
  635.         _arguments['----'] = _object
  636.  
  637.  
  638.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  639.                 _arguments, _attributes)
  640.         if _arguments.has_key('errn'):
  641.             raise MacOS.Error, aetools.decodeerror(_arguments)
  642.         # XXXX Optionally decode result
  643.         if _arguments.has_key('----'):
  644.             return _arguments['----']
  645.  
  646.     def starts_with(self, _object, _attributes={}, **_arguments):
  647.         """starts with: Starts with
  648.         Required argument: an AE object reference
  649.         Keyword argument _attributes: AppleEvent attribute dictionary
  650.         Returns: anything
  651.         """
  652.         _code = 'ascr'
  653.         _subcode = 'bgwt'
  654.  
  655.         if _arguments: raise TypeError, 'No optional args expected'
  656.         _arguments['----'] = _object
  657.  
  658.  
  659.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  660.                 _arguments, _attributes)
  661.         if _arguments.has_key('errn'):
  662.             raise MacOS.Error, aetools.decodeerror(_arguments)
  663.         # XXXX Optionally decode result
  664.         if _arguments.has_key('----'):
  665.             return _arguments['----']
  666.  
  667.     def ends_with(self, _object, _attributes={}, **_arguments):
  668.         """ends with: Ends with
  669.         Required argument: an AE object reference
  670.         Keyword argument _attributes: AppleEvent attribute dictionary
  671.         Returns: anything
  672.         """
  673.         _code = 'ascr'
  674.         _subcode = 'ends'
  675.  
  676.         if _arguments: raise TypeError, 'No optional args expected'
  677.         _arguments['----'] = _object
  678.  
  679.  
  680.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  681.                 _arguments, _attributes)
  682.         if _arguments.has_key('errn'):
  683.             raise MacOS.Error, aetools.decodeerror(_arguments)
  684.         # XXXX Optionally decode result
  685.         if _arguments.has_key('----'):
  686.             return _arguments['----']
  687.  
  688.     def contains(self, _object, _attributes={}, **_arguments):
  689.         """contains: Containment
  690.         Required argument: an AE object reference
  691.         Keyword argument _attributes: AppleEvent attribute dictionary
  692.         Returns: anything
  693.         """
  694.         _code = 'ascr'
  695.         _subcode = 'cont'
  696.  
  697.         if _arguments: raise TypeError, 'No optional args expected'
  698.         _arguments['----'] = _object
  699.  
  700.  
  701.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  702.                 _arguments, _attributes)
  703.         if _arguments.has_key('errn'):
  704.             raise MacOS.Error, aetools.decodeerror(_arguments)
  705.         # XXXX Optionally decode result
  706.         if _arguments.has_key('----'):
  707.             return _arguments['----']
  708.  
  709.     def _and(self, _object, _attributes={}, **_arguments):
  710.         """and: Logical conjunction
  711.         Required argument: an AE object reference
  712.         Keyword argument _attributes: AppleEvent attribute dictionary
  713.         Returns: anything
  714.         """
  715.         _code = 'ascr'
  716.         _subcode = 'AND '
  717.  
  718.         if _arguments: raise TypeError, 'No optional args expected'
  719.         _arguments['----'] = _object
  720.  
  721.  
  722.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  723.                 _arguments, _attributes)
  724.         if _arguments.has_key('errn'):
  725.             raise MacOS.Error, aetools.decodeerror(_arguments)
  726.         # XXXX Optionally decode result
  727.         if _arguments.has_key('----'):
  728.             return _arguments['----']
  729.  
  730.     def _or(self, _object, _attributes={}, **_arguments):
  731.         """or: Logical disjunction
  732.         Required argument: an AE object reference
  733.         Keyword argument _attributes: AppleEvent attribute dictionary
  734.         Returns: anything
  735.         """
  736.         _code = 'ascr'
  737.         _subcode = 'OR  '
  738.  
  739.         if _arguments: raise TypeError, 'No optional args expected'
  740.         _arguments['----'] = _object
  741.  
  742.  
  743.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  744.                 _arguments, _attributes)
  745.         if _arguments.has_key('errn'):
  746.             raise MacOS.Error, aetools.decodeerror(_arguments)
  747.         # XXXX Optionally decode result
  748.         if _arguments.has_key('----'):
  749.             return _arguments['----']
  750.  
  751.     def as(self, _object, _attributes={}, **_arguments):
  752.         """as: Coercion
  753.         Required argument: an AE object reference
  754.         Keyword argument _attributes: AppleEvent attribute dictionary
  755.         Returns: anything
  756.         """
  757.         _code = 'ascr'
  758.         _subcode = 'coer'
  759.  
  760.         if _arguments: raise TypeError, 'No optional args expected'
  761.         _arguments['----'] = _object
  762.  
  763.  
  764.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  765.                 _arguments, _attributes)
  766.         if _arguments.has_key('errn'):
  767.             raise MacOS.Error, aetools.decodeerror(_arguments)
  768.         # XXXX Optionally decode result
  769.         if _arguments.has_key('----'):
  770.             return _arguments['----']
  771.  
  772.     def _not(self, _object, _attributes={}, **_arguments):
  773.         """not: Logical negation
  774.         Required argument: an AE object reference
  775.         Keyword argument _attributes: AppleEvent attribute dictionary
  776.         Returns: anything
  777.         """
  778.         _code = 'ascr'
  779.         _subcode = 'NOT '
  780.  
  781.         if _arguments: raise TypeError, 'No optional args expected'
  782.         _arguments['----'] = _object
  783.  
  784.  
  785.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  786.                 _arguments, _attributes)
  787.         if _arguments.has_key('errn'):
  788.             raise MacOS.Error, aetools.decodeerror(_arguments)
  789.         # XXXX Optionally decode result
  790.         if _arguments.has_key('----'):
  791.             return _arguments['----']
  792.  
  793.     def negate(self, _object, _attributes={}, **_arguments):
  794.         """negate: Numeric negation
  795.         Required argument: an AE object reference
  796.         Keyword argument _attributes: AppleEvent attribute dictionary
  797.         Returns: anything
  798.         """
  799.         _code = 'ascr'
  800.         _subcode = 'neg '
  801.  
  802.         if _arguments: raise TypeError, 'No optional args expected'
  803.         _arguments['----'] = _object
  804.  
  805.  
  806.         _reply, _arguments, _attributes = self.send(_code, _subcode,
  807.                 _arguments, _attributes)
  808.         if _arguments.has_key('errn'):
  809.             raise MacOS.Error, aetools.decodeerror(_arguments)
  810.         # XXXX Optionally decode result
  811.         if _arguments.has_key('----'):
  812.             return _arguments['----']
  813.  
  814.  
  815. #    Class '' ('undf') -- 'the undefined value'
  816.  
  817. #    Class 'upper case' ('case') -- 'Text with lower case converted to upper case'
  818.  
  819. #    Class 'machines' ('mach') -- 'every computer'
  820. #        property '' ('c@#!') 'type' -- '' [0]
  821.  
  822. #    Class 'machine' ('mach') -- 'A computer'
  823.  
  824. #    Class 'zones' ('zone') -- 'every AppleTalk zone'
  825. #        property '' ('c@#!') 'type' -- '' [0]
  826.  
  827. #    Class 'zone' ('zone') -- 'AppleTalk zone'
  828.  
  829. #    Class 'seconds' ('scnd') -- 'more than one second'
  830.  
  831. #    Class 'item' ('cobj') -- 'An item of any type'
  832. #        property 'id' ('ID  ') 'long' -- 'the unique id number of this object' [mutable]
  833.  
  834. #    Class 'items' ('cobj') -- 'Every item'
  835. #        property '' ('c@#!') 'type' -- '' [0]
  836.  
  837. #    Class 'text items' ('citm') -- ''
  838. #        property '' ('c@#!') 'type' -- '' [0]
  839.  
  840. #    Class 'text item' ('citm') -- ''
  841.  
  842. #    Class 'date' ('ldt ') -- 'Absolute date and time values'
  843. #        property 'weekday' ('wkdy') 'wkdy' -- 'the day of a week of a date' []
  844. #        property 'month' ('mnth') 'mnth' -- 'the month of a date' []
  845. #        property 'day' ('day ') 'long' -- 'the day of the month of a date' []
  846. #        property 'year' ('year') 'long' -- 'the year of a date' []
  847. #        property 'time' ('time') 'long' -- 'the time since midnight of a date' []
  848. #        property 'date string' ('dstr') 'TEXT' -- 'the date portion of a date-time value as a string' []
  849. #        property 'time string' ('tstr') 'TEXT' -- 'the time portion of a date-time value as a string' []
  850.  
  851. #    Class 'dates' ('ldt ') -- 'every date'
  852. #        property '' ('c@#!') 'type' -- '' [0]
  853.  
  854. #    Class 'month' ('mnth') -- 'a month'
  855.  
  856. #    Class 'months' ('mnth') -- 'every month'
  857. #        property '' ('c@#!') 'type' -- '' [0]
  858.  
  859. #    Class 'January' ('jan ') -- "It's June in January..."
  860.  
  861. #    Class 'February' ('feb ') -- 'the month of February'
  862.  
  863. #    Class 'March' ('mar ') -- 'the month of March'
  864.  
  865. #    Class 'April' ('apr ') -- 'the month of April'
  866.  
  867. #    Class 'May' ('may ') -- 'the very merry month of May'
  868.  
  869. #    Class 'June' ('jun ') -- 'the month of June'
  870.  
  871. #    Class 'July' ('jul ') -- 'the month of July'
  872.  
  873. #    Class 'August' ('aug ') -- 'the month of August'
  874.  
  875. #    Class 'September' ('sep ') -- 'the month of September'
  876.  
  877. #    Class 'October' ('oct ') -- 'the month of October'
  878.  
  879. #    Class 'November' ('nov ') -- 'the month of November'
  880.  
  881. #    Class 'December' ('dec ') -- 'the month of December'
  882.  
  883. #    Class 'weekday' ('wkdy') -- 'a weekday'
  884.  
  885. #    Class 'weekdays' ('wkdy') -- 'every weekday'
  886. #        property '' ('c@#!') 'type' -- '' [0]
  887.  
  888. #    Class 'Sunday' ('sun ') -- 'Sunday Bloody Sunday'
  889.  
  890. #    Class 'Monday' ('mon ') -- 'Blue Monday'
  891.  
  892. #    Class 'Tuesday' ('tue ') -- 'Ruby Tuesday'
  893.  
  894. #    Class 'Wednesday' ('wed ') -- 'Wednesday Week'
  895.  
  896. #    Class 'Thursday' ('thu ') -- 'Thursday Afternoon'
  897.  
  898. #    Class 'Friday' ('fri ') -- 'Friday'
  899.  
  900. #    Class 'Saturday' ('sat ') -- "Saturday Night's Alright for Fighting"
  901.  
  902. #    Class 'RGB color' ('cRGB') -- 'Three numbers specifying red, green, blue color values'
  903.  
  904. #    Class 'RGB colors' ('cRGB') -- 'every RGB color'
  905. #        property '' ('c@#!') 'type' -- '' [0]
  906.  
  907. #    Class 'integer' ('long') -- 'An integral number'
  908.  
  909. #    Class 'integers' ('long') -- 'every integer'
  910. #        property '' ('c@#!') 'type' -- '' [0]
  911.  
  912. #    Class 'boolean' ('bool') -- 'A true or false value'
  913.  
  914. #    Class 'booleans' ('bool') -- 'every boolean'
  915. #        property '' ('c@#!') 'type' -- '' [0]
  916.  
  917. #    Class 'real' ('doub') -- 'A real number'
  918.  
  919. #    Class 'reals' ('doub') -- 'every real'
  920. #        property '' ('c@#!') 'type' -- '' [0]
  921.  
  922. #    Class 'list' ('list') -- 'An ordered collection of items'
  923. #        property 'length' ('leng') 'long' -- 'the length of a list' []
  924.  
  925. #    Class 'lists' ('list') -- 'every list'
  926. #        property '' ('c@#!') 'type' -- '' [0]
  927.  
  928. #    Class 'linked list' ('llst') -- 'An ordered collection of items'
  929. #        property 'length' ('leng') 'long' -- 'the length of a list' []
  930.  
  931. #    Class 'linked lists' ('llst') -- 'every linked list'
  932. #        property '' ('c@#!') 'type' -- '' [0]
  933.  
  934. #    Class 'vector' ('vect') -- 'An ordered collection of items'
  935. #        property 'length' ('leng') 'long' -- 'the length of a list' []
  936.  
  937. #    Class 'vectors' ('vect') -- 'every vector'
  938. #        property '' ('c@#!') 'type' -- '' [0]
  939.  
  940. #    Class 'record' ('reco') -- 'A set of labeled items'
  941.  
  942. #    Class 'records' ('reco') -- 'every record'
  943. #        property '' ('c@#!') 'type' -- '' [0]
  944.  
  945. #    Class 'script' ('scpt') -- 'An AppleScript script'
  946. #        property 'parent' ('pare') 'scpt' -- 'the parent of a script' []
  947.  
  948. #    Class 'scripts' ('scpt') -- 'every script'
  949. #        property '' ('c@#!') 'type' -- '' [0]
  950.  
  951. #    Class 'string' ('TEXT') -- 'a sequence of characters'
  952.  
  953. #    Class 'strings' ('TEXT') -- 'every string'
  954. #        property '' ('c@#!') 'type' -- '' [0]
  955.  
  956. #    Class 'styled text' ('STXT') -- 'a sequence of characters with style'
  957. #        property '' ('c@#!') 'type' -- '' [0]
  958.  
  959. #    Class 'number' ('nmbr') -- 'an integer or floating point number'
  960.  
  961. #    Class 'numbers' ('nmbr') -- 'every number'
  962. #        property '' ('c@#!') 'type' -- '' [0]
  963.  
  964. #    Class 'class' ('pcls') -- 'the type of a value'
  965. #        property 'inherits' ('c@#^') 'pcls' -- 'classes to inherit properties from' []
  966.  
  967. #    Class 'classes' ('pcls') -- 'every class'
  968. #        property '' ('c@#!') 'type' -- '' [0]
  969.  
  970. #    Class 'event' ('evnt') -- 'an AppleEvents event'
  971.  
  972. #    Class 'events' ('evnt') -- 'every event'
  973. #        property '' ('c@#!') 'type' -- '' [0]
  974.  
  975. #    Class 'property' ('prop') -- 'an AppleEvents property'
  976.  
  977. #    Class 'properties' ('prop') -- 'every property'
  978. #        property '' ('c@#!') 'type' -- '' [0]
  979.  
  980. #    Class 'constant' ('enum') -- 'A constant value'
  981.  
  982. #    Class 'constants' ('enum') -- 'every constant'
  983. #        property '' ('c@#!') 'type' -- '' [0]
  984.  
  985. #    Class 'preposition' ('prep') -- 'an AppleEvents preposition'
  986.  
  987. #    Class 'prepositions' ('prep') -- 'every preposition'
  988. #        property '' ('c@#!') 'type' -- '' [0]
  989.  
  990. #    Class 'key' ('keyf') -- 'an AppleEvents key form'
  991.  
  992. #    Class 'keys' ('keyf') -- 'every key'
  993. #        property '' ('c@#!') 'type' -- '' [0]
  994.  
  995. #    Class 'picture' ('PICT') -- 'A picture'
  996.  
  997. #    Class 'pictures' ('PICT') -- 'every picture'
  998. #        property '' ('c@#!') 'type' -- '' [0]
  999.  
  1000. #    Class 'reference' ('obj ') -- 'An AppleScript reference'
  1001.  
  1002. #    Class 'references' ('obj ') -- 'every reference'
  1003. #        property '' ('c@#!') 'type' -- '' [0]
  1004.  
  1005. #    Class 'data' ('rdat') -- 'An AppleScript raw data object'
  1006.  
  1007. #    Class 'handler' ('hand') -- 'An AppleScript handler'
  1008.  
  1009. #    Class 'handlers' ('hand') -- 'every handler'
  1010. #        property '' ('c@#!') 'type' -- '' [0]
  1011.  
  1012. #    Class 'list or record' ('lr  ') -- 'a list or record'
  1013.  
  1014. #    Class 'list or string' ('ls  ') -- 'a list or string'
  1015.  
  1016. #    Class 'list, record or text' ('lrs ') -- 'a list, record or text'
  1017.  
  1018. #    Class 'number or date' ('nd  ') -- 'a number or date'
  1019.  
  1020. #    Class 'number, date or text' ('nds ') -- 'a number, date or text'
  1021.  
  1022. #    Class 'alias' ('alis') -- 'a reference to an existing file'
  1023.  
  1024. #    Class 'aliases' ('alis') -- 'every alias'
  1025. #        property '' ('c@#!') 'type' -- '' [0]
  1026.  
  1027. #    Class 'application' ('capp') -- 'specifies global properties of AppleScript'
  1028. #        property 'result' ('rslt') 'cobj' -- 'the last result of evaluation' []
  1029. #        property 'space' ('spac') 'TEXT' -- 'a space character' []
  1030. #        property 'return' ('ret ') 'TEXT' -- 'a return character' []
  1031. #        property 'tab' ('tab ') 'TEXT' -- 'a tab character' []
  1032. #        property 'minutes' ('min ') 'TEXT' -- 'the number of seconds in a minute' []
  1033. #        property 'hours' ('hour') 'TEXT' -- 'the number of seconds in an hour' []
  1034. #        property 'days' ('days') 'TEXT' -- 'the number of seconds in a day' []
  1035. #        property 'weeks' ('week') 'TEXT' -- 'the number of seconds in a week' []
  1036. #        property 'pi' ('pi  ') 'doub' -- 'the constant pi' []
  1037. #        property 'print length' ('prln') 'long' -- 'the maximum length to print' []
  1038. #        property 'print depth' ('prdp') 'long' -- 'the maximum depth to print' []
  1039. #        property 'reverse' ('rvse') 'list' -- 'the reverse of a list' []
  1040. #        property 'rest' ('rest') 'list' -- 'the rest of a list' []
  1041. #        property 'text item delimiters' ('txdl') 'list' -- 'the text item delimiters of a string' []
  1042. #        property 'AppleScript' ('ascr') 'scpt' -- 'the top-level script object' []
  1043.  
  1044. #    Class 'applications' ('capp') -- 'every application'
  1045. #        property '' ('c@#!') 'type' -- '' [0]
  1046.  
  1047. #    Class 'app' ('capp') -- 'Short name for application'
  1048.  
  1049. #    Class 'version' ('vers') -- 'a version value'
  1050.  
  1051. #    Class 'writing code info' ('citl') -- 'Script code and language code of text run'
  1052. #        property 'script code' ('pscd') 'shor' -- 'the script code for the text' []
  1053. #        property 'language code' ('plcd') 'shor' -- 'the language code for the text' []
  1054.  
  1055. #    Class 'writing code infos' ('citl') -- 'every writing code info'
  1056. #        property '' ('c@#!') 'type' -- '' [0]
  1057.